import axios from "./request";

export default function (option) {
  return new Promise((resolve, reject) => {
    axios({
      url: option.url,
      method: option.method || "post",
      data: option.data || {},
    }).then(
      (res) => {
        resolve(res);
      },
      (res) => {
        reject(res);
      }
    );
  });
}
